﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace PhilipService.Entity
{
    [DataContract]
    public class SetStatusRequest {
        [DataMember(Name = "customerid")]
        public long CustomerId { get; set; }

        [DataMember(Name = "status")]
        public int Status { get; set; }
    }

    public class SetStatusResponse
    {
        [DataMember(Name = "code")]
        public int Code { get; set; }
    }

    [DataContract]
    public class LoginRequest {
        [DataMember(Name = "name")]
        public string Name { get; set; }

        [DataMember(Name = "password")]
        public string Password { get; set; }
    }

    [DataContract]
    public class LoginResponse {
        [DataMember(Name = "code")]
        public int Code { get; set; }

        [DataMember(Name = "customerid")]
        public long CustomerId { get; set; }

        [DataMember(Name = "name")]
        public string Name { get; set; }

        [DataMember(Name = "tel")]
        public string Phone { get; set; }

        [DataMember(Name = "ownid")]
        public string OwnId { get; set; }

        [DataMember(Name = "hostid")]
        public string HostId { get; set; }
    }

    [DataContract]
    public class GetMyInfoRequest {
        [DataMember(Name = "customerid")]
        public long CustomerId { get; set; }
    }

    [DataContract]
    public class GetMyInfoResponse {
        [DataMember(Name = "name")]
        public string Name { get; set; }

        [DataMember(Name = "hostid")]
        public string HostId { get; set; }

        [DataMember(Name = "ownid")]
        public string OwnId { get; set; }

        [DataMember(Name = "information")]
        public string Infomation { get; set; }
    }

    [DataContract]
    public class GetUserInfoRequest {
        [DataMember(Name = "userid")]
        public string UserId { get; set; }

        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }
    }

    [DataContract]
    public class GetUserInfoResponse {
        [DataMember(Name = "name")]
        public string UserName { get; set; }

        [DataMember(Name = "company")]
        public string Company { get; set; }

        [DataMember(Name = "information")]
        public string Information { get; set; }

        [DataMember(Name = "tel")]
        public string Phone { get; set; }
    }

    [DataContract]
    public class GetDeviceInfoRequest {
        [DataMember(Name = "application_id")]
        public string DeviceId { get; set; }

        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }
    }

    [DataContract]
    public class GetDeviceInfoResponse {
        [DataMember(Name = "device_name")]
        public string DeviceName { get; set; }

        [DataMember(Name = "model")]
        public string Model { get; set; }

        [DataMember(Name = "company")]
        public string Company { get; set; }

        [DataMember(Name = "department")]
        public string Department { get; set; }

        [DataMember(Name = "sn")]
        public string SNCode { get; set; }
    }

    [DataContract]
    public class RefuseServiceRequest {
        [DataMember(Name = "customerid")]
        public long CustomerId { get; set; }
    }

    [DataContract]
    public class RefuseServiceResponse {
        [DataMember(Name = "code")]
        public int Code { get; set; }
    }

    [DataContract]
    public class EndServiceRequest
    {
        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }
    }

    [DataContract]
    public class EndServiceResponse
    {
        [DataMember(Name = "code")]
        public int Code { get; set; }
    }

    [DataContract]
    public class CloseServiceRequest {
        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }
    }

    [DataContract]
    public class CloseServiceResponse {
        [DataMember(Name = "code")]
        public int Code { get; set; }
    }

    [DataContract]
    public class AddNoteRequest {
        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }

        [DataMember(Name = "note")]
        public string Note { get; set; }
    }

    [DataContract]
    public class AddNoteResponse {
        [DataMember(Name = "code")]
        public int Code { get; set; }
    }

    [DataContract]
    public class ServiceItem {
        [DataMember(Name ="id")]
        public long ServiceId { get; set; }

        [DataMember(Name = "userid")]
        public string UserId { get; set; }

        [DataMember(Name = "username")]
        public string Name { get; set; }

        [DataMember(Name = "tel")]
        public string Phone { get; set; }

        [DataMember(Name = "device_name")]
        public string DeviceName { get; set; }

        [DataMember(Name = "company_name")]
        public string CompanyName { get; set; }

        [DataMember(Name = "evaluate")]
        public string Rating { get; set; }

        [DataMember(Name = "evaluate_detail")]
        public string EvaluateDetail { get; set; }

        [DataMember(Name = "note")]
        public string Note { get; set; }

        [DataMember(Name = "starttime")]
        public string StartTime { get; set; }

        [DataMember(Name = "endtime")]
        public string EndTime { get; set; }

        [DataMember(Name = "status")]
        public ServiceStatus Status { get; set; }

        [DataMember(Name = "is_close")]
        public int IsClosed { get; set; }
    }

    [DataContract]
    public class GetServiceDetailRequest {
        [DataMember(Name = "serviceid")]
        public long ServiceId { get; set; }
    }

    [DataContract]
    public class GetServiceDetailResponse {
        [DataMember(Name = "id")]
        public long ServiceId { get; set; }

        [DataMember(Name = "userid")]
        public string UserId { get; set; }

        [DataMember(Name = "username")]
        public string Name { get; set; }

        [DataMember(Name = "tel")]
        public string Phone { get; set; }

        [DataMember(Name = "device_name")]
        public string DeviceName { get; set; }

        [DataMember(Name = "company_name")]
        public string CompanyName { get; set; }

        [DataMember(Name = "evaluate")]
        public string Rating { get; set; }

        [DataMember(Name = "evaluate_detail")]
        public string EvaluateDetail { get; set; }

        [DataMember(Name = "note")]
        public string Note { get; set; }

        [DataMember(Name = "starttime")]
        public string StartTime { get; set; }

        [DataMember(Name = "endtime")]
        public string EndTime { get; set; }

        [DataMember(Name = "application_id")]
        public string DeviceId { get; set; }
    }

    [DataContract]
    public class GetServiceRecordRequest {
        [DataMember(Name = "customerid")]
        public long CustomerId { get; set; }
    }
}
